home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-12-06 | 1.2 KB | 27 lines | [TEXT/ToyS] |
- on PetDialog(petName, petType, petRelation)
- set dItems to [¬
- {class:push button, bounds:[40, 192, 98, 212], label:"OK"}, ¬
- {class:push button, bounds:[168, 192, 226, 212], label:"Cancel"}, ¬
- {class:text field, bounds:[72, 16, 259, 32], label bounds:[8, 16, 57, 32], label:"name:", value:petName}, ¬
- {class:radio group, bounds:[26, 48, 130, 66], button offset:[120, 16], max down:4, the items:¬
- ["cat", "dog", "weasel", "snake", "moose", "parakeet", "squirrel", "gila monster"], value:petType}, ¬
- {class:radio group, bounds:[26, 142, 126, 158], button offset:[120, 16], max down:2, the items:¬
- ["love", "hate", "who cares?", "get along"], value:petRelation}, ¬
- {class:group box, label:" Relation with: ", bounds:[10, 132, 260, 180], style:secondary group}]
-
- return {default:1, size:[270, 226], the items:dItems, name:"My Pets", style:movable modal}
- end PetDialog
-
- on run
- set dlog to PetDialog("Abbey", 3, 1)
- set f to new file default name "DD Test Dialog"
- res create f creator type "DiDi" file type "DiDi"
- set rf to res open f with write permission
- try
- res put rf id 1000 data dlog name "Pet Dialog"
- on error number n
- res close rf
- error number n
- end try
- res close rf
- end run